package com.example.service.serviceImpl;

import com.example.domain.Check;
import com.example.mapper.CheckMapper;
import com.example.service.CheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CheckServiceImpl implements CheckService {

    @Autowired
    private CheckMapper checkMapper;

    @Override
    public List<Check> showAllCheck() {
        return checkMapper.showAllCheck();
    }

    @Override
    public List<Check> showMyCheck(Integer uid) {
        return checkMapper.showMyCheck(uid);
    }

    @Override
    public List<Check> selectCheckByCheckid(Integer checkid){
        return checkMapper.selectCheckByCheckid(checkid);
    }

    @Override
    public List<String> selectCompletetimeById(String rid) {
        return checkMapper.selectCompletetimeById(rid);
    }

    @Override
    public List<String> selectCompletetime() {
        return checkMapper.selectCompletetime();
    }

    @Override
    public String selectCompletetimeByCheckid(Integer checkid) {
        return checkMapper.selectCompletetimeByCheckid(checkid);
    }

    @Override
    public String selectErrorByCheckidRid(String rid, Integer checkid) {
        return checkMapper.selectErrorByCheckidRid(rid,checkid);
    }

    @Override
    public Check selectCheckByCheckidRid(String rid, Integer checkid) {
        return checkMapper.selectCheckByCheckidRid(rid,checkid);
    }

    @Override
    public Boolean startCheck(String rid) {
        return checkMapper.startCheck(rid);
    }

    @Override
    public Boolean startTime(String Time,Integer checkid,Integer change) {
        return checkMapper.startTime(Time,checkid,change);
    }

    //插入盘点结果
    @Override
    public Boolean error(String error, String tips,String rid, String lasttime) {
        return checkMapper.hasError(error,tips,rid,lasttime);
    }

    @Override
    public Boolean setCheckId(Integer checkid,Integer rid){
        return  checkMapper.setCheckId(checkid,rid);
    }

    @Override
    public Boolean updateError(String error, Integer checkid,String rid) {
        return checkMapper.updateError(error,checkid,rid);
    }

    @Override
    public Boolean refreshCheck(Integer checkid, Integer uid, String rid, String completetime, String error,String tips) {
        return checkMapper.refreshCheck(checkid,uid,rid,completetime,error,tips);
    }

    @Override
    public Boolean insertNoResourceError(Integer checkid, Integer initial_uid, String trueid, String completetime, String error, String tips) {
        return checkMapper.insertNoResourceError(checkid,initial_uid,trueid,completetime,error,tips);
    }

    @Override
    public Boolean updateNoResourceError(Integer checkid, Integer initial_uid, String trueid, String error, String tips) {
        return checkMapper.updateNoResourceError(checkid,initial_uid,trueid,error,tips);
    }

    @Override
    public Boolean deleteCheckByCheckid(Integer checkid) {
        return checkMapper.deleteCheckByCheckid(checkid);
    }

    @Override
    public Boolean deleteCheckChange2(String rid, Integer checkid) {
        return checkMapper.deleteCheckChange2(rid,checkid);
    }

}
